[BITS 32]

[section .text]

[global sChargerGDTR]
sChargerGDTR:
  push ebp
  mov ebp, esp

  mov eax, [ebp + 8]
  mov dx, [ebp + 12]

  mov [gdtr.base], eax
  mov [gdtr.limite], dx

  lgdt [gdtr]

  mov ax, 0x10
  mov es, ax
  mov fs, ax
  mov gs, ax
  mov ds, ax
  mov ss, ax

  jmp 0x8:.suite
  .suite:

  pop ebp
  ret

[section .data]

gdtr:
  .base dd 0
  .limite dw 0